import {observable, action} from 'mobx';
import {Auth} from '../models';
import {User} from 'leancloud-storage';

export class UserInfoStore {
    @observable currentUser: User | undefined

    @action pullUser() {
        this.currentUser = Auth.getCurrentUser()
    }

    @action resetUser() {
        this.currentUser = undefined
    }
}

export default new UserInfoStore()